package com.mondo.financialwallet.presentation.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mondo.financialwallet.R;
import com.mondo.financialwallet.presentation.model.HoldProduct;

public class HoldProductAdapter extends BaseQuickAdapter<HoldProduct, BaseViewHolder> {

//    public static HoldProductAdapter get(int layoutResId){
//        String name = "蚂蚁量化精选", amount = "100.2", day = "180", c = "12.2";
//        return new HoldProductAdapter(layoutResId, new ArrayList<>(
//                Arrays.asList(
//                        new HoldProduct(name, amount, day, c),
//                        new HoldProduct(name, amount, day, c)
//                )
//        ));
//    }

    public HoldProductAdapter(){
        this(R.layout.item_hold_product);
    }

    public HoldProductAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, HoldProduct item) {
        helper.setText(R.id.name_text, item.getName());
        helper.setText(R.id.hold_amount_text, item.getHoldAmount());
        helper.setText(R.id.minimum_day_text, item.getMinimumDay());
        helper.setText(R.id.cumulative_income_text, item.getCumulativeIncome());
    }
}
